//
//  YJFoodViewController.m
//  Healthfood
//
//  Created by qianfeng01 on 15/7/9.
//  Copyright (c) 2015年 qianfeng01. All rights reserved.
//

#import "YJFoodViewController.h"
#import "YJBaseViewController.h"
@interface YJFoodViewController ()

@end

@implementation YJFoodViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    [self creatViewControllers];
}

-(void)creatViewControllers{
    NSMutableArray *vcArray =[[NSMutableArray alloc] init];
    NSArray *nameArray =@[@"健康菜单",@"健康知识",@"精品推荐",@"更多"];
    NSArray *imageNames =@[@"1130584",@"resize_png_new.php2",@"resize_png_new.php",@"resize_png_new.php3",];
    NSMutableArray * VCNames =[NSMutableArray arrayWithArray:@[@"YJMenuViewController",@"YJLedgeViewController",@"YJSeekViewController",@"YJDetailsViewController"]];
    for (NSInteger i=0; i <VCNames.count; i++) {
        Class vcClass =NSClassFromString(VCNames[i]);
        YJBaseViewController *vc =[[vcClass alloc] init];
        UINavigationController *niv =[[UINavigationController alloc] initWithRootViewController:vc];
        niv.tabBarItem.image =[UIImage imageNamed:[NSString stringWithFormat:@"%@",imageNames[i]]];
        
        vc.title =nameArray[i];
        [vcArray addObject:niv];
    }
    self.viewControllers =vcArray;
}


@end
